Only retry transactions which fail from timeout.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Fri, 9 Sep 2005 17:03:34 +0000 (17:03 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Fri, 9 Sep 2005 17:03:34 +0000 (17:03 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/xenstore/xstransact.py

index 0be418401a25b1d842e85b9e2a5c291503a88f84..2e03f3498c547b8709d6f11e97de4cf6e37396a9 100644 (file)
@@ -108,7 +108,9 @@ class xstransact:
             try:
                 return cls.Read(path, *args)
             except RuntimeError, ex:
-                pass
+                if ex.args[0] == errno.ETIMEDOUT:
+                    pass
+                raise
 
     SafeRead = classmethod(SafeRead)
 
@@ -118,6 +120,8 @@ class xstransact:
                 cls.Write(path, *args, **opts)
                 return
             except RuntimeError, ex:
-                pass
+                if ex.args[0] == errno.ETIMEDOUT:
+                    pass
+                raise
 
     SafeWrite = classmethod(SafeWrite)